package com.wanwu.channel.common.enums;

/**
 * @ClassName TlQryResultEnum
 * @Description 通联报关查询结果枚举
 * @Author husheng
 * @Date 2020-02-25 11:21
 */
public enum TlQryResultEnum {

    DECLARE_FAIL("tl0001", "发送海关失败"),
    NOT_DECLARE("tl0002", "待发送海关"),
    ALREADY_DECLARE("tl0003", "发送海关成功"),
    TL_INSERT_FAIL("tl0004", "电子口岸入库失败"),
    TL_INSERT_SUCCESS("tl0005", "电子口岸入库成功申报中"),
    CUSTOMS_FAIL("tl0006", "海关申报失败"),
    SUCCESS("tl0007", "三单对碰成功") ,
    NOT_VERIFY("tl0008", "申报成功未三单对碰"),
    QRY_UNKNOW("tl0009", "查询到未知状态"),
    CUSTOMS_REJECT("tl0010", "海关退单"),
    DECLARE_SUCCESS("tl0011", "海关入库三单对碰报关成功"),
    DEAL_ERROR("tl0012", "海关处理异常"),
    ;

    private String code;
    private String desc;

    TlQryResultEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public static TlQryResultEnum find(String code) {
        for (TlQryResultEnum type : TlQryResultEnum.values()) {
            if (type.getCode().equals(code)) {
                return type;
            }
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }
}
